#include <dbplayer/dbplayer.h>
#include <dbplayer/dbplayerbase.h>
#include <proto/exec.h>
#include <dos.h>

extern void __regargs __autoopenfail(char *);

extern long __oslibversion;

struct DBPlayerBase *DBPlayerBase;

int __stdargs _STI_opendb(void)
{

     DBPlayerBase = (struct DBPlayerBase *)OpenLibrary("dbplayer.library",DBPLAYER_VERSION);

     if(DBPlayerBase != NULL) return 0;

	__oslibversion=DBPLAYER_VERSION;
	__autoopenfail("dbplayer.library");
     return 1;
}

void __stdargs _STD_closedb(void)
{
     if(DBPlayerBase)
       CloseLibrary((struct Library *)DBPlayerBase);
}
